package com.luomo.java.spring.circulardepend;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author LiuMei
 * @date 2021-04-20.
 */
public class ClientSpringContainer {

    public static void main(String[] args) {
        //scope="prototype" 无法解决循环依赖
        //scope="singleton" 可以解决循环依赖
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        A a = context.getBean("a", A.class);
        B b = context.getBean("b", B.class);
    }
}
